Example: Using the SNMP Service SL Library
Product: CODESYS IIOT Libraries SL
The SNMP Service SL Example.project
sample project, which also provides a visualization to send and receive SNMP messages, shows how to use the SNMP Service SL library.
Description
The SNMP Service SL Example.project
shows how to use the library function blocks in the following applications.
Application: SNMPAgentExample
The example shows how to use the SNMP_AGENT
library function block and how to register values. A visualization shows the status of the agent.
![]() |
Application: SNMPGetNextExample
The example shows how to use the SNMP_GET_REQUEST
library function block for an SNMP GET_NEXT request. The resulting values of a query are displayed in a visualization.
In the example, note that the respective value of an OID is always in the next data set.
![]() |
The IP addresses and the OID are configured with the visualization.
Application: SNMPSetExample
The example shows how to use the SNMP_SET
library function block. SET telegrams can be sent via a visualization.
![]() |
Application: SNMPTrapReceiver
The example shows how to use the SNMP_TRAP_RECEIVER
library function block. The received values are displayed in a visualization.

Application: SNMPTrapSender
The example shows how to use the SNMP_TRAP_SENDER
library function block. TRAP telegrams can be sent via a visualization.

System requirements and restrictions
Programming system | CODESYS Development System (version 3.5.18.0 or higher) |
Runtime system | CODESYS Control Win (version 3.5.18.0) |
Add-on components | - |
Supported platforms/devices | All NoteNote: Use the
|
Restrictions | Supported SNMP versions: SNMP V1, SNMP V2c, SNMP V3 |
Note
DOWNLOAD projects